# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-stix
_pkgname=stix
pkgver=1.2.0.10
pkgrel=7
pkgdesc='An API for parsing and generating STIX content.'
url='https://pypi.org/project/stix/#files'
license=('custom:unknown')
arch=('any')
depends=('python' 'python-lxml' 'python-dateutil' 'python-cybox'
         'python-mixbox')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('db0eb47b2e4f75e81492b373613baec101e2b5c7547128e67586436b1501559099459fcfdce48816969be2c1088c0078e7b4cacefb8fac1232a470ab160eee11')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package_python-stix() {
  cd "$_pkgname-$pkgver"

  python setup.py install --prefix=/usr --root="$pkgdir" -O1 --skip-build

  install -Dm 644 LICENSE.txt \
    "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

